//-------------------------------------------------------------------
//	Copyright (c) 2012-2014 Zhirnov Andrey
//	This file is part of the "UXGEN-ES" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------
/*
	BaseObject - base class for Systems, Resources, Event Listeners and other.
	BaseObject can be static or dynamic, for dynamic creation use static function,
	which return shared pointer type, new operator supported, but not safe.
*/

#pragma once

#include "Base/Include/Common.h"
#include "Base/Include/EngineSubSystems.h"

namespace Engine
{
namespace Base
{

	//
	// Base Object
	//

	class BaseObject : public CReferencedObject
	{
	// variables
	private:
		EngineSubSystemsRef		_engineSubSystems;


	// methods
	public:
		BaseObject (const EngineSubSystemsRef ess) :
			_engineSubSystems(ess)
		{
		}

		EngineSubSystemsRef			GetSubSystems ()		{ return _engineSubSystems; }
		EngineSubSystemsRef const	GetSubSystems () const	{ return _engineSubSystems; }


	/*private:
		BaseObject (const BaseObject &) {}

		RVALUE_REFERENCE_ONLY( BaseObject (BaseObject &&) {} )

		void operator = (const BaseObject &) {}*/
	};


#	define ESS()	GetSubSystems()


	SHARED_POINTER( BaseObject );


}	// Base
}	// Engine